﻿<%@ Page Language="C#" MasterPageFile="~/cms/defaultLayout.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="cms_default" %>
<%@ MasterType  virtualPath="~/cms/defaultLayout.master"%>
<asp:Content ID="mainContent" ContentPlaceHolderID="main" runat="server">
        <div class="content">
           <div class="buttons"><center>
                <a id="A1" class="" runat="server" href="~/cms/film"><asp:Label ID="lblFilm" runat="server"/>[Film]</a> -
                <a id="A2" class="" runat="server" href="~/cms/planning"><asp:Label ID="lblplanning" runat="server" />[Planning]</a> -
                <a id="A3" class="" runat="server" href="~/cms/account"><asp:Label ID="lblAccount" runat="server"/>[Account]</a> -
                <a id="A4" class="" runat="server" href="~/cms/abonnement"><asp:Label ID="lblAbonnement" runat="server" />[Abonnement]</a> -
                <a id="A5" class="" runat="server" href="~/cms/zaal"><asp:Label ID="lblZaal" runat="server"/>[Zaal]</a> -
                <a id="A6" class="" runat="server" href="~/cms/vestiging"><asp:Label ID="lblVestiging" runat="server" />[Vestiging]</a> -
                <a id="A7" class="" runat="server" href="~/cms/user"><asp:Label ID="lblUser" runat="server"/>[User]</a> - 
               <a id="A8" class="" runat="server" href="~/cms/kaarten"><asp:Label ID="lblKaarten" runat="server"/><b>[Kaarten]</b></a>
                </center>
            </div>
            <p>This is "Kaarten" of CMS</p>
            <form id="kaarten_form" runat="server">
            <div class="cms_view" dir="ltr">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="New" />&nbsp;
                 <asp:Button ID="Button2" runat="server" Text="Cancel" OnClick="Button2_Click" />&nbsp;
                     <br />
                <br />
                <asp:GridView ID="KaartGridView" runat="server" DataSourceID="kaart_select" DataKeyNames="kaart_soort_id" OnSelectedIndexChanged="Kaart_SelectedIndexChanged" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" AutoGenerateColumns="False">
                    <AlternatingRowStyle BackColor="#CCCCCC"></AlternatingRowStyle>
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" ButtonType="Button"></asp:CommandField>
                        <asp:BoundField DataField="kaart_soort_id" HeaderText="Kaartsoort ID" ReadOnly="True" SortExpression="kaart_soort_id"></asp:BoundField>
                        <asp:BoundField DataField="kaart_soort_naam" HeaderText="Kaartsoort naam" SortExpression="kaart_soort_naam"></asp:BoundField>
                        <asp:BoundField DataField="kaart_soort_naam_en" HeaderText="Kaartsoort naam [EN]" SortExpression="kaart_soort_naam_en"></asp:BoundField>
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC"></FooterStyle>

                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White"></HeaderStyle>

                    <PagerStyle HorizontalAlign="Center" BackColor="#999999" ForeColor="Black"></PagerStyle>

                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White"></SelectedRowStyle>

                    <SortedAscendingCellStyle BackColor="#F1F1F1"></SortedAscendingCellStyle>

                    <SortedAscendingHeaderStyle BackColor="#808080"></SortedAscendingHeaderStyle>

                    <SortedDescendingCellStyle BackColor="#CAC9C9"></SortedDescendingCellStyle>

                    <SortedDescendingHeaderStyle BackColor="#383838"></SortedDescendingHeaderStyle>
                </asp:GridView>
                <br />
                <hr />
                <br />
                
                <asp:DetailsView ID="KaartDetailsView" runat="server" OnItemDeleted="KaartDetailsView_ItemDeleted" OnItemUpdated="KaartDetailsView_ItemUpdated" OnItemInserted="KaartDetailsView_ItemInserted" DataSourceID="kaart_details" CellPadding="4" ForeColor="#333333" GridLines="None" AutoGenerateRows="False" DataKeyNames="kaart_soort_id">
                    <AlternatingRowStyle BackColor="White"></AlternatingRowStyle>

                    <CommandRowStyle BackColor="#C5BBAF" Font-Bold="True"></CommandRowStyle>

                    <EditRowStyle BackColor="#7C6F57"></EditRowStyle>

                    <FieldHeaderStyle BackColor="#D0D0D0" Font-Bold="True"></FieldHeaderStyle>
                    <Fields>
                        <asp:BoundField DataField="kaart_soort_id" HeaderText="Kaartsoort ID" InsertVisible="false" ReadOnly="True" SortExpression="kaart_soort_id"></asp:BoundField>
                        <asp:BoundField DataField="kaart_soort_naam" HeaderText="Kaartsoort naam" SortExpression="kaart_soort_naam"></asp:BoundField>
                        <asp:BoundField DataField="kortingpercentage" HeaderText="Kortingpercentage" SortExpression="kortingpercentage"></asp:BoundField>
                        <asp:BoundField DataField="kortingbedrag" HeaderText="Kortingbedrag" SortExpression="kortingbedrag"></asp:BoundField>
                        <asp:BoundField DataField="kaart_soort_naam_en" HeaderText="Kaartsoort naam [EN]" SortExpression="kaart_soort_naam_en"></asp:BoundField>
                        <asp:CommandField ShowInsertButton="True" ShowEditButton="True" ShowDeleteButton="True" ButtonType="Button" ></asp:CommandField>
                    </Fields>
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White"></FooterStyle>

                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White"></HeaderStyle>

                    <PagerStyle HorizontalAlign="Center" BackColor="#666666" ForeColor="White"></PagerStyle>

                    <RowStyle BackColor="#E3EAEB"></RowStyle>
                </asp:DetailsView>
                <asp:EntityDataSource ID="kaart_select" runat="server" ConnectionString="name=debioscoopEntities" DefaultContainerName="debioscoopEntities" EnableFlattening="False" EntitySetName="kaart_soort" EntityTypeFilter="kaart_soort"></asp:EntityDataSource>

                <asp:EntityDataSource ID="kaart_details" runat="server"
                    ConnectionString="name=debioscoopEntities"
                    DefaultContainerName="debioscoopEntities"
                    EnableFlattening="False" EntitySetName="kaart_soort"
                    EntityTypeFilter="kaart_soort" EnableDelete="True" EnableInsert="True" EnableUpdate="True"
                    Where="it.kaart_soort_id = @kaart_soort">
                    <WhereParameters>
                        <asp:ControlParameter ControlID="KaartGridView" PropertyName="SelectedValue" Name="kaart_soort" Type="Int32"></asp:ControlParameter>
                    </WhereParameters>
                </asp:EntityDataSource>
                </div>
                </form>
                <div class="clearDiv"></div>
        </div>
</asp:Content>
